import request from "@/api/index"

export default {
  /**
   * @description: 上传文件 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  fileUpload (params) {
    const url = "base/files/upload"
    return request.post(url, params)
  },
  /**
   * @description: 下载文件 *代表必填
   * @param {integer} fileId *
   * @return {Object}
   */
  fileDownload (params) {
    const url = "base/files/download"
    return request.fileGet(url, params)
  },

  getImageURL (id) {
    const url = "base/files/preview?fileId=" + id
    return request.get(url)
  },
  /**
 * @description: 批量删除文件 *代表必填
 * @param {integer} fileId *
 * @return {Object}
 */
  delList (params) {
    const url = "base/files/delListById"
    return request.get(url, params)
  },
  /**
   * @description: 分页查询疾病 *代表必填
   * @param {Object} params *
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @return {Object}
   */
  queryPageByCondition (params) {
    const url = "/base/files/queryPageByCondition"
    return request.post(url, params)
  },
}
